package jicheng;

public class Cat extends Animal {

	private String address;
	
	
	
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Cat() {
		super();
		System.out.println("子类无参数构造方法");
	}

	public Cat(String name, int age,String address) {
		super(name, age);
		this.address = address;
		System.out.println("子类有参数构造方法");
	}

	@Override
	public void say() {
		super.say();
		System.out.println("我是一个猫，我叫："+this.getName()+","
				+ "年龄："+this.getAge()+",来自："+address);
	}

	public static void main(String[] args) {
		Cat cat = new Cat("Tom",3,"火星");
		
		cat.say();
	}
}
	
